package com.yanqu.road.server.cmd.banquet.auto;


import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.banquet.CrossBanquetProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.banquet.CrossBanquetAutoMgr;
import com.yanqu.road.server.protocol.Protocol;


@Cmd(code = Protocol.C_CROSS_BANQUET_JOIN_AUTO_LOG, desc = "")
public class BanquetAutoJoinLogCmd extends CrossCommand {


    private long userId;
    private CrossBanquetProto.BanquetAutoJoinLogReq reqMsg;


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = CrossBanquetProto.BanquetAutoJoinLogReq.parseFrom(packet.getBytes());
        userId = packet.getPlayerId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossBanquetAutoMgr.userJoinLog(userId,serverId,reqMsg.getAcId());
    }

    @Override
    public void sendData() {

    }
}
